//
//  NetworkHandle.h
//  UI_新版豆瓣
//
//  Created by Scott on 15/7/31.
//  Copyright (c) 2015年 Scott. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol NetworkHandleDelegate <NSObject>

- (void)didFinishLoadData:(id)result;

@end



@interface NetworkHandle : NSObject

@property (nonatomic, assign) id<NetworkHandleDelegate> delegate;

/* 协议封装 */
+ (void)GETWithURL:(NSString *)urlStr delegate:(id<NetworkHandleDelegate>) delegate;


+ (void)POSTWithURL:(NSString *)urlStr httpBody:(NSString *)httpbody delegate:(id<NetworkHandleDelegate>)delegate;




/* BLock封装 */
/* GET异步 */
+ (void)GETWithURL:(NSString *)urlStr completion:(void (^)(id result))block;


/* POST异步 */
+ (void)POSTWithURL:(NSString *)urlStr httpBody:(NSString *)httpBody completion:(void (^)(id result))block;





@end
